// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class PEO : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Event Identifiers Used",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] EventIdentifiersUsed {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Event Symptom/Diagnosis Code",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] EventSymptomDiagnosisCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Event Onset Date/Time",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EventOnsetDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Event Exacerbation Date/Time",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EventExacerbationDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Event Improved Date/Time",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EventImprovedDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Event Ended Data/Time",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM EventEndedDataTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Event Location Occurred Address",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.True, HL7Required.True,"XAD")]
	    public XAD[] EventLocationOccurredAddress {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Event Qualification",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.True, HL7Required.True,"ID")]
		[EventQualification]
	    public ID[] EventQualification {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Event Serious",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"ID")]
		[EventSeriousness]
	    public ID EventSerious {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Event Expected",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"ID")]
		[EventExpected]
	    public ID EventExpected {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Event Outcome",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.True, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.True, HL7Required.True,"ID")]
		[EventConsequence]
	    public ID[] EventOutcome {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Patient Outcome",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"ID")]
		[PatientOutcome]
	    public ID PatientOutcome {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Event Description from Others",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.True, HL7Required.True,"FT")]
	    public FT[] EventDescriptionfromOthers {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Event Description from Original Reporter",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.True, HL7Required.True,"FT")]
	    public FT[] EventDescriptionfromOriginalReporter {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Event Description from Patient",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v27, 15, HL7Repeat.True, HL7Required.True,"FT")]
	    public FT[] EventDescriptionfromPatient {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Event Description from Practitioner",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.True, HL7Required.True,"FT")]
	    public FT[] EventDescriptionfromPractitioner {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Event Description from Autopsy",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.True, HL7Required.True,"FT")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.True, HL7Required.True,"FT")]
	    public FT[] EventDescriptionfromAutopsy {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Cause Of Death",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.True, HL7Required.True,"CWE")]
		[notableforCE]
	    public CWE[] CauseOfDeath {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Primary Observer Name",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.True, HL7Required.True,"XPN")]
	    public XPN[] PrimaryObserverName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Primary Observer Address",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.True, HL7Required.True,"XAD")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.True, HL7Required.True,"XAD")]
	    public XAD[] PrimaryObserverAddress {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Primary Observer Telephone",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"XTN")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"XTN")]
	    public XTN[] PrimaryObserverTelephone {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Primary Observer's Qualification",22)]
  	    [HL7Field(HL7Version.v23, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"ID")]
		[PrimaryObserversQualification]
	    public ID PrimaryObserversQualification {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("23 Confirmation Provided By",23)]
  	    [HL7Field(HL7Version.v23, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 23, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 23, HL7Repeat.False, HL7Required.True,"ID")]
		[PrimaryObserversQualification]
	    public ID ConfirmationProvidedBy {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("24 Primary Observer Aware Date/Time",24)]
  	    [HL7Field(HL7Version.v23, 24, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 24, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 24, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 24, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 24, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 24, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 24, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM PrimaryObserverAwareDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("25 Primary Observer's identity May Be Divulged",25)]
  	    [HL7Field(HL7Version.v23, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 25, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 25, HL7Repeat.False, HL7Required.True,"ID")]
		[IdentityMayBeDivulged]
	    public ID PrimaryObserversidentityMayBeDivulged {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 43)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 44)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 45)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
	    	EventIdentifiersUsed = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 1, options, "PEO.1");
	    	EventSymptomDiagnosisCode = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 2, options, "PEO.2");
			EventOnsetDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(DTM), "PEO.3");
			EventExacerbationDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(DTM), "PEO.4");
			EventImprovedDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(DTM), "PEO.5");
			EventEndedDataTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(DTM), "PEO.6");
	    	EventLocationOccurredAddress = (XAD[])ParseTextAtPositionIntoDataArray<XAD>(segmentTextParts, 7, options, "PEO.7");
	    	EventQualification = (ID[])ParseTextAtPositionIntoDataArray<ID>(segmentTextParts, 8, options, "PEO.8");
			EventSerious = (ID)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(ID), "PEO.9");
			EventExpected = (ID)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(ID), "PEO.10");
	    	EventOutcome = (ID[])ParseTextAtPositionIntoDataArray<ID>(segmentTextParts, 11, options, "PEO.11");
			PatientOutcome = (ID)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(ID), "PEO.12");
	    	EventDescriptionfromOthers = (FT[])ParseTextAtPositionIntoDataArray<FT>(segmentTextParts, 13, options, "PEO.13");
	    	EventDescriptionfromOriginalReporter = (FT[])ParseTextAtPositionIntoDataArray<FT>(segmentTextParts, 14, options, "PEO.14");
	    	EventDescriptionfromPatient = (FT[])ParseTextAtPositionIntoDataArray<FT>(segmentTextParts, 15, options, "PEO.15");
	    	EventDescriptionfromPractitioner = (FT[])ParseTextAtPositionIntoDataArray<FT>(segmentTextParts, 16, options, "PEO.16");
	    	EventDescriptionfromAutopsy = (FT[])ParseTextAtPositionIntoDataArray<FT>(segmentTextParts, 17, options, "PEO.17");
	    	CauseOfDeath = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 18, options, "PEO.18");
	    	PrimaryObserverName = (XPN[])ParseTextAtPositionIntoDataArray<XPN>(segmentTextParts, 19, options, "PEO.19");
	    	PrimaryObserverAddress = (XAD[])ParseTextAtPositionIntoDataArray<XAD>(segmentTextParts, 20, options, "PEO.20");
	    	PrimaryObserverTelephone = (XTN[])ParseTextAtPositionIntoDataArray<XTN>(segmentTextParts, 21, options, "PEO.21");
			PrimaryObserversQualification = (ID)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(ID), "PEO.22");
			ConfirmationProvidedBy = (ID)ParseTextAtPositionIntoData(segmentTextParts, 23, options, typeof(ID), "PEO.23");
			PrimaryObserverAwareDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 24, options, typeof(DTM), "PEO.24");
			PrimaryObserversidentityMayBeDivulged = (ID)ParseTextAtPositionIntoData(segmentTextParts, 25, options, typeof(ID), "PEO.25");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("PEO");
		    segmentParts.Add(GetER7TextForSegmentArrayPart(EventIdentifiersUsed, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(EventSymptomDiagnosisCode, options));
			segmentParts.Add(GetER7TextForSegmentPart(EventOnsetDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(EventExacerbationDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(EventImprovedDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(EventEndedDataTime, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(EventLocationOccurredAddress, options));
		    segmentParts.Add(ConvertStringArray(EventQualification, options));
		    segmentParts.Add(EventSerious);
		    segmentParts.Add(EventExpected);
		    segmentParts.Add(ConvertStringArray(EventOutcome, options));
		    segmentParts.Add(PatientOutcome);
		    segmentParts.Add(ConvertStringArray(EventDescriptionfromOthers, options));
		    segmentParts.Add(ConvertStringArray(EventDescriptionfromOriginalReporter, options));
		    segmentParts.Add(ConvertStringArray(EventDescriptionfromPatient, options));
		    segmentParts.Add(ConvertStringArray(EventDescriptionfromPractitioner, options));
		    segmentParts.Add(ConvertStringArray(EventDescriptionfromAutopsy, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(CauseOfDeath, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PrimaryObserverName, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PrimaryObserverAddress, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(PrimaryObserverTelephone, options));
		    segmentParts.Add(PrimaryObserversQualification);
		    segmentParts.Add(ConfirmationProvidedBy);
			segmentParts.Add(GetER7TextForSegmentPart(PrimaryObserverAwareDateTime, options));
		    segmentParts.Add(PrimaryObserversidentityMayBeDivulged);
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

